<template>
  <div class="panel">
    <el-row>
      <el-col :span="22">
        <div :class="{'pane': true,'paneActive': active}">
          <slot />
        </div>
      </el-col>
      <el-col :span="2" style="line-height: 20px;">
        <i v-if="!active" class="el-icon-arrow-down" @click="active = true" />
        <i v-else class="el-icon-arrow-up" @click="active = false" />
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'Index',
  data() {
    return {
      active: false
    }
  }
}
</script>

<style scoped>
  .panel {
    width: 100%;
    padding: 0px;
  }
  .pane {
    line-height: 20px;
    height: 20px;
    overflow:hidden;
  }
  .paneActive {
    height: auto;
  }
</style>
